<template>
  <div class="content">   
    <div class="accountCon">
    <div class="return"  @click="back">
      <img class="backImg" src="@/assets/images/back.png" alt />
    </div>
      <!--列表-->
      <el-row>
        <el-col :span="24">
          <el-table
            :data="list"
            size="small"
            border
            :cell-style="$style.cellStyle"
            :header-cell-style="$style.rowClass"
          >
            <ElTableColumn label="序号" type="index" width="55" />
            <ElTableColumn label="咨询时间"  prop="name" />
            <ElTableColumn label="病例单号" prop="create_time" />
            <ElTableColumn label="客户姓名"  prop="type_one_name" />
            <ElTableColumn label="手机号"  prop="type_two_name" />
            <ElTableColumn label="咨询医生"  prop="type_three_name" />
            <ElTableColumn label="诊断结果"  prop="creator_name" />
            <ElTableColumn label="成交金额"  prop="price" />
            <ElTableColumn label="成交类型"  prop="price" />
            <ElTableColumn label="是否成交">
              <template slot-scope="{ row }">
                <div v-if="row.status == 1">否</div>
                <div v-if="row.status == 2">是</div>
              </template>
            </ElTableColumn>
          </el-table>
          <pagination
            class="page tc mt10"
            :total="page.total"
            :page.sync="page.page"
            :limit.sync="page.pagesize"
            @pagination="getList"
          />
        </el-col>
      </el-row>
    </div>
  </div>
</template>

<script>
import pagination from '@/components/Pagination'
import { getProductItem} from '@/api/goods';
class Page {
  total = 0;
  page = 1;
  pagesize = 10
}
export default {
  name: 'ClassifyList',
  components: {
    pagination
  },
  data () {
    return {
      page: new Page(), // 分页
      list: [], // 数据展示
    }
  },

  mounted () {
    this.getList();
  },
  methods: {
    back () {
       // 返回
      const query = {
        detail: this.$route.query.detail,
        id: this.$route.query.detail.id,
        activeName: "fourteen"
      };
      this.$router.push({ name: "客户详情", query });
    },
   
    // 获取列表
    getList () {
        getProductItem({...this.page}).then(res => {
          this.list = res.data;
          this.page.total = res.total;
        })
    },
  }
}
</script>

<style lang="scss" scoped>
.return {
  position: fixed;
  right: 20px;
  top: 71px;
  z-index: 999;
  .backImg {
    margin-right: 14px;
    width: 32px;
    height: 100%;
    cursor: pointer;
    vertical-align: middle;
  }
}
</style>
